﻿using Basic.FormModel.UserRecord;
using Basic.FormRemoteModel.UserRecord;
using Basic.UserFormService.Interface;
using WeDonekRpc.Client.Interface;

namespace Basic.UserFormService.RpcEvent
{
    internal class UserRecordEvent : IRpcApiService
    {
        private readonly IUserRecordService _Service;

        public UserRecordEvent ( IUserRecordService service )
        {
            this._Service = service;
        }
        public long SetUserRecord ( SetUserRecord obj )
        {
            UserRecordDto res = this._Service.SetRecord(obj.Data);
            return res.Id;
        }
        public bool CheckUserRecordIsNull ( CheckUserRecordIsNull obj )
        {
            return this._Service.CheckIsNull(obj.FormId, obj.LinkType, obj.LinkPK);
        }
    }
}
